package day7;

import day3.School;

import java.io.*;
import java.io.Serializable;
/**
 * @author oldliu
 * @since 1.0
 */
public class WiteObject {
    public static void main(String[] args) {
        //序列化：对象存入流中
        School s=new School("合肥科海","马鞍山路",10,20);
        try {
            //s instanceof Seriaziable
            ObjectOutputStream oout=new ObjectOutputStream(new FileOutputStream("f:/java82/school.obj"));
            oout.writeObject(s);
            oout.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
